package edu.zhku.ttms.domain;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;

/**
 * @author 林志强
 * @since 2021/4/18 22:15
 */

public class Ticket {

    /**
     * 罚单主键
     */
    private Long ticketId;

    /**
     * 所罚车ID
     */
    private Long carId;

    /**
     * 所罚车
     */
    private Car car;

    /**
     * 被罚者驾驶证号
     */
    private String driverLicenseNumber;

    /**
     * 开罚单的交警代号
     */
    private Long policeId;

    /**
     * 开罚单的交警
     */
    private TrafficPoliceman trafficPoliceman;

    /**
     * 违章时间
     */
    private Date violationTime;

    /**
     * 违章地点
     */
    private String violationPlace;

    /**
     * 罚款金额
     */
    private BigDecimal amount;

    /**
     * 缴费状态（0：未缴费 1：已缴费）
     */
    private Integer status;

    /**
     * 逻辑删除（0：默认，未删除 1：已删除）
     */
    private Integer isDeleted;

    public Ticket() {}

    public Ticket(Long ticketId, Long carId, Car car, String driverLicenseNumber, Long policeId, TrafficPoliceman trafficPoliceman, Date violationTime, String violationPlace, BigDecimal amount, Integer status, Integer isDeleted) {
        this.ticketId = ticketId;
        this.carId = carId;
        this.car = car;
        this.driverLicenseNumber = driverLicenseNumber;
        this.policeId = policeId;
        this.trafficPoliceman = trafficPoliceman;
        this.violationTime = violationTime;
        this.violationPlace = violationPlace;
        this.amount = amount;
        this.status = status;
        this.isDeleted = isDeleted;
    }

    /**
     * 无ticketId，用于插入insert
     */
    public Ticket(Long carId, String driverLicenseNumber, Date violationTime, String violationPlace, BigDecimal amount) {
        this.carId = carId;
        this.driverLicenseNumber = driverLicenseNumber;
        this.violationTime = violationTime;
        this.violationPlace = violationPlace;
        this.amount = amount;
    }

    public Long getTicketId() {
        return ticketId;
    }

    public void setTicketId(Long ticketId) {
        this.ticketId = ticketId;
    }

    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public String getDriverLicenseNumber() {
        return driverLicenseNumber;
    }

    public void setDriverLicenseNumber(String driverLicenseNumber) {
        this.driverLicenseNumber = driverLicenseNumber;
    }

    public Long getPoliceId() {
        return policeId;
    }

    public void setPoliceId(Long policeId) {
        this.policeId = policeId;
    }

    public TrafficPoliceman getTrafficPoliceman() {
        return trafficPoliceman;
    }

    public void setTrafficPoliceman(TrafficPoliceman trafficPoliceman) {
        this.trafficPoliceman = trafficPoliceman;
    }

    public Date getViolationTime() {
        return violationTime;
    }

    public void setViolationTime(Date violationTime) {
        this.violationTime = violationTime;
    }

    public String getViolationPlace() {
        return violationPlace;
    }

    public void setViolationPlace(String violationPlace) {
        this.violationPlace = violationPlace;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public String toString() {
        return "Ticket{" +
                "ticketId=" + ticketId +
                ", carId=" + carId +
                ", car=" + car +
                ", driverLicenseNumber='" + driverLicenseNumber + '\'' +
                ", policeId='" + policeId + '\'' +
                ", trafficPoliceman=" + trafficPoliceman +
                ", violationTime=" + violationTime +
                ", violationPlace='" + violationPlace + '\'' +
                ", amount=" + amount +
                ", status=" + status +
                ", isDeleted=" + isDeleted +
                '}';
    }
}
